// JavaScript Document

var flashvars = {};
var params = {menu:'false',allowScriptAccess:'always',quality:'high',wmode:'transparent'};
var attributes = {};

swfobject.embedSWF("/cn/swf/city.swf", "city", "690", "290", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
swfobject.embedSWF("/cn/swf/music.swf", "music", "180", "57", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
swfobject.embedSWF("/cn/swf/gate.swf", "gate", "1000", "273", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
swfobject.embedSWF("/cn/swf/home_game.swf", "game", "484", "219", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
swfobject.embedSWF("/cn/swf/home_talking.swf", "saying", "211", "80", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
swfobject.embedSWF("/cn/swf/home_sponsors.swf", "sponsors", "1000", "60", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

function initHomePage(){
	$('.video img,.download img,.vote img,.more img,#edu img').hover(function(){
		$(this).fadeTo(500, 0);
	}, function(){
		$(this).fadeTo(400, 1);
	});
	$('#menu .vote a').click(function(){
		$.colorbox({
			href: "/cn/vote.html",
			width: 610,
			height: 655
		});
		return false;
	});
	$('.media .video a').click(function(){
		homevideo();
});

//$('#report').jScrollPane({
//    verticalDragMinHeight: 34,
//    verticalDragMaxHeight: 34
//});

//var settings = {
//    verticalDragMinHeight: 34,
//    verticalDragMaxHeight: 34

//};
//$('#report').jScrollPane(settings).onImagesLoad({
//    callback: function (ref) {
//        $(ref).jScrollPane(settings);
//    }
//});


};

function homevideo(){
	$.colorbox({
		href: "/cn/video.html",
		width: 692,
		height: 394
	});
};

//if (navigator.userAgent.toLowerCase().match(/Chrome/i)) {
//    document.write(' <style type="text/css"> ');
//    document.write(' #report p {padding-bottom:80px;}');
//    document.write(' </style> ');
//}